home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 217_01 / spell.doc < prev    next >
Text File  |  1980-01-01  |  3KB  |  89 lines

  1. < Spell Documentation >
  2.  
  3.     Spell copies named files to standard output while looking up each word
  4. in a dictionary.
  5.  
  6. In order to get started, first of all, you have to make a single dictionary
  7. file concatenating nine dictionary pieces in two delivered disks.
  8. Because the concatenated dictionary file is very large, it will require a hard
  9. disk or a floppy disk with at least 500K capacity.
  10. The dictionary consists of nine files;
  11.  
  12. SPELL0.DAT  a            - bright
  13. SPELL1.DAT  brighten     - deduce
  14. SPELL2.DAT  deduced      - floss
  15. SPELL3.DAT  flotilla     - instructed
  16. SPELL4.DAT  instructing  - ms
  17. SPELL5.DAT  msec         - prosecution
  18. SPELL6.DAT  prosecutions - skipjack
  19. SPELL7.DAT  skipl        - unasterisked
  20. SPELL8.DAT  unattacked   - zworykin
  21.                                          ( These are from DECUS )
  22.  
  23. The best way to concatenate those files is to use MSDOS command, "copy".
  24. For example,
  25.  
  26. COPY SPELL0.DAT + SPELL1.DAT + SPELL2.DAT .. + SPELL8.DAT DICT
  27.  
  28. The dictionary file must be named DICT because the name is defined in the
  29. program.
  30.  
  31. Spell is called with this format:
  32.  
  33. spell file0 file1 file2 ...  <cr>
  34.  
  35. Spell opens the named text files and checks if there are any misspelled words.
  36. If any spelling errors are found in a particular line, an additional line
  37. will be displayed line indicating errors with asterisks under the misspelled
  38. word.
  39. When spell is called for the first time, it makes an index file DICTDX which
  40. is used for a binary search. Because of this, the first run may be quite slow.
  41. The example is given below;
  42.  
  43. (Before spell checker)
  44.  
  45. Thank you for buying spell checker program.
  46. This is a test text.
  47. Eror is displayed like this.
  48. Thank you agai.
  49.  
  50. (Result)
  51.  
  52. Thank you for buying spell checker program.
  53. This is a test text.
  54. Eror is displayed like this.
  55. ****                        
  56. Thank you agai.
  57.           **** 
  58.  
  59. In this disk, there are three executable spell programs, SPELLS.EXE,
  60. SPELLC.EXE, and SPELLH.EXE.
  61. Although they were compiled under Microsoft C, SPELL.C is quite portable and
  62. should be compilable under most compilers.
  63. SPELLS is compiled with the small size model option, SPELLC with compact size
  64. model, and SPELLH with huge size model.
  65. Because SPELLC and SPELLH can store more index keys than SPELLS in main memory,
  66. they perform faster than SPELLS and  require more memory than SPELLS.
  67. SPELLS requires less memory and its performance will be slower than SPELLC and
  68. SPELLH.
  69. You should decide which one is most suitable for your computer, considering
  70. your main memory capacity.
  71. If you run out of memory, you need to change the value of DEFAULT_DIF
  72. which is defined in the program and recompile. DEFAULT_DIF is the manifest
  73. constant which decides how often index keys are picked up from a dictionary
  74. file.
  75. For example,
  76.  
  77. #define DEFAULT_DIF 10
  78.  
  79. means that the program picks up a index key after every 10 dictionary words.
  80. If you increase this value, SPELL creates fewer index keys so that less memory
  81. is used for storing index keys in main memory.
  82. These are the DEFAULT_DIF values used in three executable programs.
  83. (The value of MAX_DIR_ENTRIES  is also changed.)
  84.  
  85.           DEFAULT_DIF         MAX_DIR_ENTRIES
  86.  
  87. SPELLS         20                3000
  88. SPELLC         10                6000
  89. SPELLH          5               10000